<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" th:href="@{../layui/css/layui.css}" media="all" />
</head>
<body>
	<div class="layui-row">
		<div class="layui-col-md9">
			<div style="padding: 1em 1em 1em 1em;">
				<form class="layui-form">
				<input type="hidden" name="id" />
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">发送邮箱</label>
							<div class="layui-input-inline">
								<select name="sendmail" lay-filter="sendmail">
									<option th:each="mail:${mailList}" th:text="${mail.account}" th:value="${mail.id}"></option>
								</select>
							</div>
						</div>
						<div class="layui-inline">
							<button class="layui-btn" lay-submit="" lay-filter="demo2">保存</button>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">收件人</label>
						<div class="layui-input-block">
							<input type="text" name="remail" lay-verify="remail"
								class="layui-input" />
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">抄送</label>
						<div class="layui-input-block">
							<input type="text" name="copyto" lay-verify="copyto"
								class="layui-input" />
						</div>
					</div>
					
					<div class="layui-form-item">
						<label class="layui-form-label">密送</label>
						<div class="layui-input-block">
							<input type="text" name="bcopyto" lay-verify="copyto"
								class="layui-input" />
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">邮件主题</label>
						<div class="layui-input-block">
							<input type="text" name="subject" lay-verify="subject" placeholder="请输入主题" class="layui-input" />
						</div>
					</div>

					<div class="layui-upload"
						style="padding-bottom: 1.5em; padding-left: 2.5em;">
						<button type="button" class="layui-btn layui-btn-normal"
							id="testList">选择附件</button>
						<div class="layui-upload-list">
							<table class="layui-table">
								<thead>
									<tr>
										<th>文件名</th>
										<th>大小</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="demoList"></tbody>
							</table>
						</div>
						<button type="button" class="layui-btn" id="testListAction">开始上传</button>
					</div>
					<div style="padding-left: 2.5em;">
						<textarea id="demo" style="display: none;"></textarea>
					</div>


					<div class="layui-form-item" style="margin-top: 1em;">
						<div class="layui-inline" style="margin-left: 2.5em;">
							<button class="layui-btn" lay-submit="" lay-filter="demo1">发送</button>
						</div>

						<div class="layui-inline">
							<div class="layui-input-inline">
								<input type="checkbox" name="priority" lay-skin="primary"
									title="紧急" /> <input type="checkbox" name="notification"
									lay-skin="primary" title="回执" />
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
		<div class="layui-col-md3">
			<div align="center">
				<table class="layui-table" lay-data="{width: 252,url:'/mail/contact/page', page:true, id:'tableId'}" lay-filter="tableFilter">
					<thead>
						<tr>
							<th lay-data="{templet: '#contact',align:'center',style:'cursor: pointer;',event: 'addContact'}">联系人</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>
	<script type="text/html" id="contact">
		{{d.name}}&lt;{{d.email}}>
	</script>
	<script th:inline="javascript">
		var message = [[${message}]];
	</script>
	<script th:src="@{../plugin/testH/jquery.min.js?v=2.1.4}"></script>
	<script th:src="@{../layui/layui.js}" charset="utf-8"></script>
	<script th:src="@{../js/mail/email_drafts.js}" charset="utf-8"></script>

</body>

</html>